home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / GraphStyle.java < prev    next >
Text File  |  1998-09-03  |  2KB  |  79 lines

  1.  
  2. package com.symantec.itools.swing;
  3.  
  4. /**
  5.  * GraphStyle determines the style of the graph to draw such as bar, line, pie, or scatter
  6.  * @author Michael Hopkins, Symantec
  7.  */
  8.  
  9. public interface GraphStyle
  10. {
  11.     //--------------------------------------------------
  12.     // constants
  13.     //--------------------------------------------------
  14.  
  15.     /**
  16.      * Defines the default graph style (which also happens to be line)
  17.      */
  18.     public static final int DEFAULT_STYLE = 0;
  19.  
  20.     /**
  21.      * Defines the line graph style. This causes variable pixel width lines to
  22.      * be drawn between consecutive data points
  23.      */
  24.     public static final int LINE_STYLE = 0;
  25.  
  26.     /**
  27.      * Defines the line graph style. This causes variable pixel width lines to
  28.      * be drawn between consecutive data points
  29.      */
  30.     public static final int BAR_STYLE = 1;
  31.  
  32.     /**
  33.      * Defines the scatter graph style. This causes data points to be simply plotted
  34.      */
  35.     public static final int SCATTER_STYLE = 2;
  36.  
  37.     /**
  38.      * Defines the pie graph style. This causes the data to be plotted as a pie chart
  39.      */
  40.     public static final int PIE_STYLE = 3;
  41.  
  42.     /**
  43.      * Defines the area graph style. Similar to the line graph except that area beneath
  44.      * line is filled with a solid color corresponding to the color to be used by the series
  45.      */
  46.     public static final int AREA_STYLE = 4;
  47.  
  48.  
  49.     //--------------------------------------------------
  50.     // methods
  51.     //--------------------------------------------------
  52.  
  53.     /**
  54.      * Sets the new graph style.
  55.      * @param style the new border style, one of DEFAULT_STYLE, LINE_STYLE,
  56.      *    BAR_STYLE, GRAPH_PIE_STYLE, AREA_STYLE, or SCATTER_STYLE
  57.      * @see #getStyle
  58.      * @see #DEFAULT_STYLE
  59.      * @see #LINE_STYLE
  60.      * @see #BAR_STYLE
  61.      * @see #PIE_STYLE
  62.      * @see #AREA_STYLE
  63.      * @see #SCATTER_STYLE
  64.      */
  65.     public void setStyle(int style);
  66.      /**
  67.      * Gets the new graph style.
  68.      * @return the new border style, one of DEFAULT_STYLE, LINE_STYLE,
  69.      *    BAR_STYLE, PIE_STYLE, AREA_STYLE, or SCATTER_STYLE
  70.      * @see #setStyle
  71.      * @see #DEFAULT_STYLE
  72.      * @see #LINE_STYLE
  73.      * @see #BAR_STYLE
  74.      * @see #PIE_STYLE
  75.      * @see #AREA_STYLE
  76.      * @see #SCATTER_STYLE
  77.      */
  78.     public int getStyle();
  79. }